home *** CD-ROM | disk | FTP | other *** search
- class classes.fx.DeathLaserTrail
- {
- var x;
- var y;
- var id;
- var dir;
- var cMax;
- var clip;
- var a;
- var type;
- var axis;
- var rv;
- var xMov = 0;
- var yMov = 0;
- var c = 0;
- var Name = "deathLaserTrail";
- function DeathLaserTrail(px, py, pdir, pid)
- {
- this.x = px;
- this.y = py;
- this.id = pid;
- this.dir = pdir;
- this.cMax = _root.randRange(15,45);
- _root.d = _root.d + 1;
- this.clip = _root.attachMovie("deathLaserTrail","deathLaserTrail" + this.id + "Clip",_root.d);
- this.clip._x = this.x;
- this.clip._y = this.y;
- this.a = _root.randRange(20,80);
- this.clip._alpha = this.a;
- this.type = _root.randRange(1,4);
- if(this.dir == "U" || this.dir == "D")
- {
- this.axis = "y";
- }
- else
- {
- this.axis = "x";
- }
- this.clip.gotoAndStop(this.dir);
- var _loc3_ = _root.randRange(-10,10);
- if(_loc3_ == 0)
- {
- _loc3_ == 1;
- }
- this[this.axis + "Mov"] = _loc3_;
- this.rv = this[this.axis + "Mov"] * _root.randRange2(-0.1,-0.05);
- }
- function move1()
- {
- }
- function move2()
- {
- this[this.axis + "Mov"] *= 1.05;
- }
- function move3()
- {
- this[this.axis + "Mov"] /= 1.05;
- }
- function move4()
- {
- this[this.axis + "Mov"] += this.rv;
- }
- function main()
- {
- this["move" + this.type]();
- this.c = this.c + 1;
- if(this.c >= this.cMax)
- {
- _root.removeFX("deathLaserTrail" + this.id);
- }
- this.clip._alpha = this.a - this.c * (this.a / this.cMax);
- this.x += this.xMov;
- this.y += this.yMov;
- this.clip._x = this.x;
- this.clip._y = this.y;
- }
- }
-